package com.example.j2025_11_8;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Clas")
public class Clas {
    @RequestMapping("/add")
    public String  add(Integer num1,Integer num2){
        //校验输入值是否正确
        if(num1 == null || num2 == null){
            return "输入不正确请重新输入";
        }
        Integer sum = num1 + num2;
        return "sum = "+ sum;
    }
}
